package part3;

/**
 * @author wcj
 * @Date 2021/5/11 15:46
 * @Version 1.0
 */
public class Part39 {
    public static void main(String[] args) {
        int x = 7;
        int y = 8;
        System.out.println("x="+Integer.toBinaryString(x)+",y="+Integer.toBinaryString(y));
        // 0
        System.out.println("x&y="+(x&y));
        // 15
        System.out.println("x|y="+(x|y));
        // 15
        System.out.println("x^y="+(x^y));
        //两个应该是有溢出
        System.out.println("~x="+(~x));
        System.out.println("~y="+(~y));
    }
}
